{% extends "base_views.html" %}

{% block title %}Dashboard view{% endblock %}

{% block content %}
<!-- TOOLTIPS -->
<link rel="stylesheet" href="/css/jquery.tooltip.css" />
<script src="/js/jquery.bgiframe.js" type="text/javascript"></script>
<script src="/js/jquery.dimensions.js" type="text/javascript"></script>
<script src="/js/jquery.tooltip.js" type="text/javascript"></script>
<script src="/js/chili-1.7.pack.js" type="text/javascript"></script>
<script>
	$(document).ready(function() {
		// Enabling tooltips
		$('#iconography *').tooltip();
		$('#viewicons *').tooltip();
});
</script>

<fieldset id="viewicons">
<table id="hor-zebra">
	<thead>
		<tr>
			<th scope="col">Package Group</th>
			<th scope="col">Queued</th>
			<th scope="col">Packaged</th>
			<th scope="col">Error</th>
		</tr>
	</thead>
	
	
	<tbody>
	{% for package in packages %}
		<tr class="{% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}">
			<td><a href="/vod/detailed_package/{{package.id}}">{{package.name}}</td>
			<td>{{package.queue}}</td>
			<td>{{package.packaged}}</td>
			<td><a href="/vod/package_group_error/{{package.id}}">{{package.error}}</a></td>
		</tr>
	{% endfor %}
	</tbody>
	
</table>
</fieldset>

<!-- VIEW'S ICONOGRAPHY -->
<hr />
{% endblock %}

{% block action_bar %}

{% if packages.has_previous %}
<a href="?page={{ packages.previous_page_number }}" class="bttn prev">Previous</a>
{% endif %}
<a href="#" onclick="javascript:actionRefreshView();" class="bttn icon refresh">Refresh<a>
{% if packages.has_next %}
<a href="?page={{ packages.next_page_number }}" class="bttn next">Next</a>
{% endif %}

{% endblock %}